#include<iostream>
#include<string.h>
#include<windows.h>
using namespace std;


void process_v1()
{
	char buffer[101];
	memset(buffer, 0, sizeof(buffer));
	const char* lable = "|/-\\";
	int len = strlen(lable);
	int cnt = 0;
	while (cnt <= 100)
	{
		printf("[%-100s][%d%%][%c]\r", buffer, cnt, lable[cnt % len]);
		fflush(stdout);
		buffer[cnt] = '=';
		cnt++;
		Sleep(10);
	}
	printf("\n");

	//cout << buffer << endl;
	//printf("\n");
	//cout << sizeof(buffer) << endl;
}
int main()
{
	/*char buffer[101] = {'v'};
	memset(buffer, 0, sizeof(buffer));
	int i = 0;
	while (i <= 100)
	{
		printf("[%-100s]\r", buffer);
		fflush(stdout);
		buffer[i] = '=';
		i++;
	}
	cout << endl;*/

	process_v1();


	return 0;
}